package com.slz3.business.module.wmsManagement.wmsStockPut.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsStockPut.domain.WmsStockPut;
import com.slz3.business.module.wmsManagement.wmsStockPut.domain.WmsStockPutCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsStockPutResController extends WmsStockPutResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, WmsStockPut wmsStockPut) {
        if (WmsStockPutResUnsafeValid.add(req, wmsStockPut)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$WmsStockPutUpdateLock(req, wmsStockPut);
        }
    }

    public Mono<ServerResponse> batchAdd(ServerRequest req, WmsStockPut wmsStockPut) {
        if (WmsStockPutResUnsafeValid.batchAdd(req, wmsStockPut)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.batchAdd_$WmsStockPutUpdateLock(req, wmsStockPut);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        if (WmsStockPutResUnsafeValid.delete(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, WmsStockPut wmsStockPut) {
        if (WmsStockPutResUnsafeValid.modify(req, wmsStockPut)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$WmsStockPutUpdateLock(req, wmsStockPut);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (WmsStockPutResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return wmsStockPutResAtomic.info_$WmsStockPutUpdateLock(req);
        if (WmsStockPutResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$WmsStockPutUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (WmsStockPutResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        //
        if (WmsStockPutResUnsafeValid.auditSubmit(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        if (WmsStockPutResUnsafeValid.audit(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        if (WmsStockPutResUnsafeValid.auditReject(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        if (WmsStockPutResUnsafeValid.usingEnable(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, WmsStockPutCondition wmsStockPutCondition) {
        if (WmsStockPutResUnsafeValid.usingDisable(req, wmsStockPutCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$WmsStockPutUpdateLock(req, wmsStockPutCondition);
        }
    }

}
